package com.ge.modules.base.controller;

import com.ge.common.utils.R;
import com.ge.modules.base.service.TbProvinceService;
import com.ge.modules.entity.TbProvinceEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 省
 *
 * @author Luo
 * @email www.baidu.com
 * @date 2018-04-12 09:56:16
 */
@RestController
@RequestMapping("/loca/province")
public class TbProvinceController {

    @Autowired
    private TbProvinceService tbProvinceService;

    /**
     * 查询所有省份
     */
    @RequestMapping("/list")
    public R list() {
        List<TbProvinceEntity> provinceList = tbProvinceService.getList();

        return R.ok().put("provinceList", provinceList);
    }


}
